package com.gbs.flash.api.controller.shop;

import com.gbs.flash.bean.constant.factory.PageFactory;
import com.gbs.flash.bean.entity.shop.Favorite;
import com.gbs.flash.bean.vo.front.Rets;
import com.gbs.flash.service.shop.FavoriteService;
import com.gbs.flash.utils.factory.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@Api(value = "收藏管理", tags = "商品订单管理")
@RestController
@RequestMapping("/shop/favorite")
public class FavoriteController {
    private Logger logger = LoggerFactory.getLogger(getClass());
    @Autowired
    private FavoriteService favoriteService;

    @ApiOperation("查询所有客户的收藏")
    @RequestMapping(value = "/list", method = RequestMethod.GET)
    public Object list() {
        Page<Favorite> page = new PageFactory<Favorite>().defaultPage();
        page = favoriteService.queryPage(page);
        return Rets.success(page);
    }
}
